module.exports = {
   get (s) {
      return document.querySelector(s)
   },
   getAll (s) {
      return document.querySelectorAll(s)
   },
   //底部导航
   tabbar (filename) {
      let html = `
      <a href="./index.html" class="${filename === 'index' ? 'active' : ''}"><i class="iconfont icon-home"></i>首页</a>
		<a href="./sports_course.html" class="${filename === 'sports' ? 'active' : ''}"><i class="iconfont icon-sports"></i>运动</a>
		<a href="./me.html" class="${filename === 'me' ? 'active' : ''}"><i class="iconfont icon-me"></i>我的</a>
      `;
      this.get('.tabbar').innerHTML = html;
   },
   //顶部导航
   navbar (filename) {
      let html = `
      <a href = "./sports_run.html" id = "run" class="${filename === 'run' ? 'active' : ''}"> 跑步</a >
      <a href="./sports_ride.html" id="ride" class="${filename === 'ride' ? 'active' : ''}">骑行</a>
      <a href="./sports_course.html" id="course" class="${filename === 'course' ? 'active' : ''}">课程训练</a>
       `
      this.get('.navbar').innerHTML =html;
   }
}